<?php

namespace App\Http\Model\PtProv;

use App\Http\Model\PtTheme;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Foundation\Auth\User as Authenticatable;


use Log;
/*
 * 城市
 */
class PtCity extends Model {

    protected $table = 'pt_city';
	protected $guarded = [];

    public function countys() {
        return $this->hasMany(PtCounty::class, 'city_id');
    }


    //关联到省份表
    public function prov()
    {
        return $this->hasOne(PtProv::class,'id', 'prov_id');
    }

    public function theme()
    {
        return $this->belongsTo(PtTheme::class,'pt_theme_id');
    }
}
